CHAPTER 19 Other Useful Kinds of Regression 289

Adjusting the amount of smoothing

R’s LOWESS program allows you adjust the stiffness of the fitted curve by specify-

ing a smoothing fraction, called f, which is a number between 0 and 1. Figure 19-12

shows what the smoothed curve looks like using three different smoothing

fractions.

Looking at Figure 19-12, you can observe the following:»

» Setting f

0 667

.

produces a rather stiff curve that rises steadily between ages

2 and 40, and then declines steadily after that (see dashed line). The value

0.667 represents 2/3, which is what R uses as the default value of the f

parameter if you don’t specify it. This curve misses important features of the

data, like the low pre-puberty hormone levels, the flat plateau during child-

bearing years, and the slowing down of the yearly decrease above age 65. You

can say that this curve shows excessive bias, systematically departing from

observed values in various places along its length.»

» Setting f

0 1. , which is at a lower extreme, produces a very jittery curve with

a lot of up-and-down wiggles that can’t possibly relate to actual ages, but

instead reflect random fluctuations in the data (see dark, solid line). You can

say that this curve shows excessive variance, with too many random fluctua-

tions along its length.

FIGURE 19-12:

You can adjust

the smoothness

of the fitted curve

by adjusting the

smoothing

fraction.

© John Wiley & Sons, Inc.